#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
#include"test.h"

//生日输入输出
void birth() {
    int date = 0;
    scanf("%d", &date);
    printf("year=%d\n", date / 10000);
    date %= 10000;
    printf("month=%02d\n", date / 100);
    printf("date=%02d\n", date % 100);
}

void Narcissistic_Num() {
    int m, n, f, s, t;
    int count = 0;
    while (scanf("%d %d", &m, &n) != EOF) {
        for (int i = m; i <= n; i++) {
            f = i / 100;
            s = i / 10 % 10;
            t = i % 10;
            if (pow(f, 3) + pow(s, 3) + pow(t, 3) == i) {
                printf("%d ", i);
                count++;
            }
        }
        if (count == 0)
            printf("no\n");
    }
    return 0;
}

void Wrong_Code() {
    int i = 0;
    int n;
    int* y;
    int* x;
    while (i < n) {
        y[i] = x[i++];//这里的代码假设y[i]的地址将在i的自增操作执行之前被求值，这一点没有任何保证
    }
    while (i < n) {
        y[i++] = x[i];//与上面代码同理
    }
    //正确的写法是：
    while (i < n) {
        y[i] = x[i];
        i++;
    }
}

int main() {
    Wrong_Code();
}